/**
#ifndef QNETWORKACCESSMANAGER_H
#define QNETWORKACCESSMANAGER_H
#include<QDebug>
#include <QCoreApplication>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QUrl>
#include <QJsonDocument>
#include <QJsonObject>
#include <QString>
#include <QDebug>

using namespace QT;

class NetworkAccess : public QObject {
    Q_OBJECT
public:
    NetworkAccess();
    void fetchData();
private slots:
    void onReplyFinished(QNetworkReply *reply);
private:
    //QNetworkAccessManager *manager;
};

#endif // QNETWORKACCESSMANAGER_H
**/
// Client.h
/**
#include <QTcpSocket>

class Client : public QObject
{
    Q_OBJECT
public:
    explicit Client(QObject *parent = nullptr);
    void connectToServer(const QString &host, quint16 port);
    void sendMessage(const QString &message);

private slots:
    void onConnected();
    void onReadyRead();
    void onDisconnected();

private:
    QTcpSocket *m_socket;
    QByteArray m_buffer;
};


#include <QCoreApplication>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QUrl>
#include <QJsonDocument>
#include <QJsonObject>
#include <QDebug>

class ApiClient : public QObject {
    Q_OBJECT
public:
    ApiClient();
    void fetchData();
private slots:
    void onReplyFinished();
}
**/

#ifndef QNET__
#define QNET__


#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QObject>
#include <QDebug>

class NetworkManagers : public QObject
{
    Q_OBJECT
public:
    NetworkManagers(QWidget *parent = nullptr);

    void get(const QUrl &url);

private slots:
    void onFinished();

private:
    QNetworkAccessManager *manager;
};
#endif
